import request from '@/utils/request'

const api = {
  user: '/user',
  role: '/role',
  service: '/service',
  device: '/device',
  alarm: '/alarm',
  permission: '/permission',
  permissionNoPager: '/permission/no-pager',
  orgTree: '/org/tree'
}

export default api

// 获取系统消息列表
export function getMessageList (parameter) {
  return request({
    url: '/iot/iotMessageLog/list',
    method: 'get',
    params: parameter
  })
}
// 根据ID获取系统消息
export function getAlarmById (id) {
  return request({
    url: '/iot/iotMessageLog/' + id,
    method: 'get',
    params: parameter
  })
}

// 添加系统消息
export function createMessage (parameter) {
  return request({
    url: '/iot/iotMessageLog/create',
    method: 'post',
    data: parameter
  })
}
// 修改系统消息
export function updateMessage (parameter) {
  return request({
    url: '/iot/iotMessageLog/update',
    method: 'post',
    data: parameter
  })
}
// 删除系统消息
export function deleteAlarm (id) {
  return request({
    url: '/iot/iotMessageLog/delete/' + id,
    method: 'post',
    data: {

    }
  })
}
